// (C) Copyright to Kevin. Applied to MIT LICENSE

#pragma once

#include "CoreMinimal.h"

#include "Block.h"
#include "../ChunkRenderTask.h"
#include "../BlockManager.h"

/**
 * 
 */
class BLOCKWORLD_API CubicBlock : public Block
{
public:
	CubicBlock();
	virtual ~CubicBlock();

	// Inherited via Block
	virtual BlockType GetBlockType() override;

	virtual FString GetTexture(int direction, int type) = 0;

	void Render(ChunkRenderTask* task, int x, int y, int z, TArray<FVector>* verticies, TArray<int32>* triangles, TArray<FVector2D>* uv0, TArray<FVector2D>* uv1, TArray<FVector2D>* uv2);

protected:
	void GetRelativeBlocks(Block** return_value, ChunkRenderTask* task, int x, int y, int z);
};
